package vn.com.shoppie.object;

import java.util.ArrayList;

import vn.com.shoppie.sobject.Slider;
import vn.com.shoppie.view.SlideFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class HeaderGiftsAdapter extends FragmentPagerAdapter {
	ArrayList<Slider> lstShop;
	public HeaderGiftsAdapter(FragmentManager fm,ArrayList<Slider> data) {
		super(fm);
		this.lstShop=data;
	}

	@Override
	public Fragment getItem(int position) {
		return SlideFragment.newInstance(lstShop.get(position));
	}

	@Override
	public int getCount() {
		return lstShop.size();
	}

	@Override
	public CharSequence getPageTitle(int position) {
		return lstShop.get(position).slideDesc;
	}

}